﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace KFGame
{

    public class QRCodeHeader : MonoBehaviour
    {
        // Start is called before the first frame update
        public delegate void QRCodesDatas(string code);
        public QRCodesDatas onQRCode;
        void Start()
        {

        }

        // Update is called once per frame
        void Update()
        {
            USBHook my = USBHook.Instantiation();
            string s = USBHook.Read();

            if (s != "")
                if (onQRCode != null)
                    onQRCode(s);
        }

        void OnApplicationQuit()
        {
            USBHook.Quit();
        }
    }
}